import React, { Component } from 'react';
import Dislog from '../components/Dialog'

class DialogPage extends Component {
    constructor(props){
        super(props)
        this.state = {
            showDialog: false
        }
    }
    render() {
        const { showDialog } = this.state
        return (
            <div>
                <h3>DialogPage</h3>
                <button onClick={()=>{
                    this.setState({
                        showDialog: !showDialog
                    })
                }}>toggle</button>
                { showDialog && <Dislog /> }
            </div>
        );
    }
}

export default DialogPage;